package com.ylxin.spring.proxy.staticproxy;

/**
 * @author 29048
 * @version V1.0
 * @Project spring
 * @Package com.ylxin.spring.proxy.staticproxy
 * @Description: 中介
 * Create by 杨立新 @Date 2022/8/26 12:44
 */
public class ZJ implements ChuzuAble {

    //中介的属性 可出租
    private ChuzuAble chuzuAble;

    /**
     * 租户和谁找房子,谁就能够出租房子
     * @param chuzuAble
     */
    //set方法
    public void setChuzuAble(ChuzuAble chuzuAble) {
        this.chuzuAble = chuzuAble;
    }

    @Override
    public void chuzu() {
        //实际上是调用 房东的出租
        System.err.println("ZJ中的方法chuzu执行了-->");
        chuzuAble.chuzu();  //谁调用就是谁出租
    }
}
